<form name="search" enctype="multipart/form-data" method="get">
<input name="admin" type="hidden" value="1">
<input name="mod" type="hidden" value="search">
<input name="module" type="hidden" value="docum">
<input name="tpl_docum_module" type="hidden" value="search">
<input name="tpl_group_filter" type="hidden" value="{$smarty.get.tpl_group_filter}">
<input name="group_id" type="hidden" value="{$smarty.get.group_id}">
<table width="100%" cellpadding="0" cellspacing="0"  bgcolor="#DBE1E5">
	<tr>
		<td align="left" style="padding-left:10px;">
			{if $smarty.get.group_id}
			{ext->class_function class="docum" func="get_product_group_data" group=$smarty.get.group_id assign="group_data"}
			{ext->class_function class="docum" func="get_product_group_data" group=$smarty.get.tpl_group_filter assign="group_filter_data"}
			{ext->class_function class="docum" func="get_group_count_data" sub=$smarty.get.group_id assign="count_data"}
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>Pasirinkta dokumentų grupė: <span style="font-weight:bold">{$group_filter_data.name}</span>, pogrupis <span style="font-weight:bold">{$group_data.name}</span></td>
				</tr>
				<tr>
					<td>Pasirinktame pogrupyje viso įrašų: <span style="font-weight:bold">{$count_data.sub_elements}</span></td>
				</tr>
			</table>
			{elseif $smarty.get.tpl_group_filter}
			{ext->class_function class="docum" func="get_group_count_data" main=$smarty.get.tpl_group_filter assign="count_data"}
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>Grupių: <span style="font-weight:bold">{$count_data.groups}</span></td>
					<td style="padding-left:10px;">Pažymėtoje grupėje pogrupių: <span style="font-weight:bold">{$count_data.sub_groups}</span></td>
				</tr>
				<tr>
					<td>Viso įrašų: <span style="font-weight:bold">{$count_data.elements}</span></td>
					<td style="padding-left:10px;">Viso įrašų: <span style="font-weight:bold">{$count_data.sub_elements}</span></td>
				</tr>
			</table>
			{else}
			{ext->class_function class="docum" func="get_group_count_data" assign="count_data"}
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>Grupių: <span style="font-weight:bold">{$count_data.groups}</span></td>
				</tr>
				<tr>
					<td>Viso įrašų: <span style="font-weight:bold">{$count_data.elements}</span></td>
				</tr>
			</table>
			{/if}
		</td>
		<td align="right">
			{if $smarty.get.group_id}
			<input name="group_id" type="hidden" value="{$smarty.get.group_id}">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td align="right" width="400" height="20" style="padding-top:6px; padding-right:8px;">{t t='Paieška pogrupyje'} <span style="font-weight:bold">{$group_data.name}</span>:</td>
				</tr>
				<tr>
					<td align="right">
						<table cellpadding="0" cellspacing="0" width="200">
							<tr>
								<td align="right"><input type="text"  name="query"  class="defaultInputText" value="{$smarty.get.query|stripslashes}" style="margin:2px 10px 2px 10px"></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			{else}
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td align="right" width="400" height="20" style="padding-top:6px; padding-right:8px;">{t t='Paieška'}:</td>
				</tr>
				<tr>
					<td align="right">
						<table cellpadding="0" cellspacing="0" width="200">
							<tr>
								<td align="right"><input type="text"  name="query"  class="defaultInputText" value="{$smarty.get.query|stripslashes}" style="margin:2px 10px 2px 10px"></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			{/if}
		</td>
	</tr>
</table>
</form>